package com.js.nickcar.entity.local;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by LZY on 2017/9/28.
 */

public class BaseCarInfoEntity implements Parcelable {
    private String title;
    private int type;
    private String param;
    private String content;
    private String value;

    public interface ItemType {
        int TYPE_SELECT = 0;
        int TYPE_INPUT = 1;
        int TYPE_NEXT = 2;
    }

    public interface Param{
        String RECEIVE_CITY = "receive_city";
        String CAR_TYPE = "car_type";
        String COLOR = "color";
        String SUNROOF = "sunroof";
        String SEATS = "seats";
        String DISPLACEMENT = "displacement";
        String MILEAGE = "mileage";
        String PLATE_TIME = "plate_time";
        String SERVICE = "service";
        String USAGE = "usage";
        String ENGINE_NO = "engine_no";
        String TRANS_TIMES = "trans_times";
        String NEXT = "next";

        String LICENSE_TYPE = "license_type";
        String TECH_STATUS = "tech_status";
        String FIX_STATUS = "fix_status";
        String STATUS = "status";

    }

    public BaseCarInfoEntity(String title, int type,String tag) {
        this.title = title;
        this.type = type;
        this.param = tag;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getParam() {
        return param;
    }

    public void setParam(String param) {
        this.param = param;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return "BaseCarInfoEntity{" +
                "content='" + content + '\'' +
                ", title='" + title + '\'' +
                ", type=" + type +
                ", param='" + param + '\'' +
                ", value='" + value + '\'' +
                '}';
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.title);
        dest.writeInt(this.type);
        dest.writeString(this.param);
        dest.writeString(this.content);
        dest.writeString(this.value);
    }

    protected BaseCarInfoEntity(Parcel in) {
        this.title = in.readString();
        this.type = in.readInt();
        this.param = in.readString();
        this.content = in.readString();
        this.value = in.readString();
    }

    public static final Creator<BaseCarInfoEntity> CREATOR = new Creator<BaseCarInfoEntity>() {
        @Override
        public BaseCarInfoEntity createFromParcel(Parcel source) {
            return new BaseCarInfoEntity(source);
        }

        @Override
        public BaseCarInfoEntity[] newArray(int size) {
            return new BaseCarInfoEntity[size];
        }
    };
}
